Documentation for Users  1.0.2
Perception Toolbox for Virtual Reality (PTVR) Manual
3D Cartesian coordinate system

In a 3D cartesian coordinate system (aka XYZ system), the position of a point is defined by 3 coordinates as illustrated in Figure 1. In this example, the coordinates of the Point P are:
X : 0.25 meters
Y : 0.20 meters
Z : 0.30 meters

Several different conventions for defining the axes directions of a 3D cartesian coordinate system are used in Mathematics and in Vision Science. The convention for the coordinate system displayed in Figure 1 is the left-handed rule (see subsection below). This is the convention adopted by PTVR.

😎 Tip: One advantage of this convention is the following : the first two dimensions (X and Y) should remind you of the convention used in most two-dimensional X-Y figures in the real world (e.g. a plot of weight vs. height). The only point you have to visualize and remember is that the Z axis goes beyond the X-Y plane (receding axis).

This xyz structure is used in some graphics programs (e.g. Unity, RenderMan). For users familiar with Unity, note that the correspondence between colors and axes is the same in PTVR and in Unity.


Figure 1: Representation of the left-handed cartesian coordinate system used in PTVR (following Unity).

Figure 2: Animation (horizontal rotation) of figure 1 to allow you to build a better mental representation of the 3D structure of the figure (as if you were able to look at the static coordinate system from different angles).


😉 Note 2: If you're impatient to use cartesian coordinates in PTVR, go directly to the PTVR User Manual.

Left-handed coordinate system


You can use this image as a mnemonic to remember the spatial configuration of a left-handed coordinate system (Image from Primalshell, CC BY-SA 3.0, via Wikimedia Commons).

Knowing if a system is left- or right-handed is useful notably to specify the orientation of 3D objects (Wikipedia contributors. (2022, February 3)).


Rightward-Upward-Forward (RUF configuration)

It does not really matter if you do not remember the formal definitions of right- and left-handed coordinate systems.
Try simply to remember the figure below.



The X axis points in the rightward direction,
The Y axis points in the upward direction,
And the Z axis points in the forward direction, i.e. "behind" the screen.


This spatial configuration will be used so often in the PTVR documentation that you should remember it quickly.


😎 Tip: as a mnemonic trick, you can also call this configuration "RUF" (Rightward (x) - Upward (y) - Forward (z) ) (as in 'ROUGH').


Some comparisons with previous work

It can be helpful for those of you who are familiar with other coordinate systems to see how they relate with previous work. Only a few examples are presented among a multitude of studies.

In the field of stereo-vision, Read & Cumming (2006) use a head-centered space coordinates to describe an object's position relative to the head : "Z is the depth axis (Z increases with distance from the observer), Y is the vertical axis (Y increases as the object moves upward), and X is the horizontal axis (X increases as the object moves leftward). "
The latter system is therefore right-handed (in contrast to the PTVR RUF system).

Read, J. C. A., & Cumming, B. G. (2006). Does depth perception require vertical-disparity detectors? Journal of Vision, 6(12), 1. https://doi.org/10.1167/6.12.1

Pointers

Wikipedia contributors. (2022, February 3). Right-hand rule. In Wikipedia, The Free Encyclopedia. Retrieved 14:46, February 21, 2022, from https://en.wikipedia.org/w/index.php?title=Right-hand_rule&oldid=1069678571